import request from '@/utils/request'


// 查询用户未选择的标签
export function listUnChosenTag(query) {
    return request({
        url: '/match/userTag/list/allTag',
        method: 'get',
        params: query
    })
}


// 查询用户标签
export function listMyTag() {
    return request({
        url: '/match/userTag/list/myTag',
        method: 'get'
    })
}
// 删除用户标签
export function removeMyTag(tagId) {
    return request({
        url: '/match/userTag/delete/' + tagId,
        method: 'delete'
    })
}



// 添加用户标签
export function addMyTag(data) {
    return request({
        url: '/match/userTag/add',
        method: 'post',
        data: data
    })
}


//根据userId查询用户标签
export function getTag(userName) {
    return request({
        url: '/match/userTag/list/Tag/' + userName,
        method: 'get',
        params: userName
    })
}


/**
 * 查询选择了全部指定标签的用户
 * @param {Array} tagIds - 标签 ID 数组，例如 [5, 6, 7]
 */
export function listUsersByTags(tagIds) {
    return request({
        url: '/match/userTag/listUsersByTags',
        method: 'post',
        data: tagIds
    })
}


